# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=xmpppy
pkgver=0.5.0_rc1
pkgrel=8
pkgdesc='A Python library to provide easy scripting with Jabber,'
arch=('any')
url='https://sourceforge.net/projects/xmpppy/files/'
license=('GPL')
depends=('python2')
makedepends=('python2-distribute')
source=("https://downloads.sourceforge.net/project/xmpppy/xmpppy/${pkgver/_/-}/xmpppy-${pkgver/_/}.tar.gz"
	      'ssl.patch')
sha512sums=('7fe91ff313533a419e125bb69163dfb122723e67ca70feab00748b5deafc0c99aa002cbebf0f89b8bc7ce465bb2c775ab98509761af07d90295bc1e9c50eee23'
            '02637368bea7283ada5d695958a3bd7a99ce4b6e56cbc99362f86482ffccc456a08fabcc1f9ce0298bbf91cf15dadf0defb68697c17889adb00e07463c5d9531')

prepare() {
  cd "$pkgname-${pkgver/_/}"

  patch -p1 <"$srcdir"/ssl.patch
}

build() {
  cd "$pkgname-${pkgver/_/}"

  python2 setup.py build
}

package() {
  cd "$pkgname-${pkgver/_/}"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}

